package cn.gdcp.videoplay;

import android.app.Activity;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.MediaController;
import android.widget.VideoView;
/*视频播放方式一：.MediaController+VideoView*/
public class MainActivity extends Activity {
    private VideoView my_videoview;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        my_videoview=findViewById(R.id.my_videoview);
        my_videoview.setVideoPath("/mnt/shared/Other/family.mp4");
        my_videoview.start();
        MediaController mediaController=new MediaController(MainActivity.this);
        my_videoview.setMediaController(mediaController);
    }
}
